/*
	@file: log/logger/LogOption.h
	@author: Wolfhead
*/
#ifndef _LOG_LOG_OPTION_H_
#define _LOG_LOG_OPTION_H_

#include "LogPriority.h"
#include "logger/Logger.h"
#include "formatter/Formatter.h"

namespace logger
{

class LogOption
{
public:

	enum
	{
		kDefaultQueueTimeout = 1000, //ms
		kDefaultQueueBuffer = 50,
		kDefaultPriority = kNone
	};

	LogOption()
	{
		initialize();
	}

	void initialize()
	{
		priority = kDefaultPriority;
		queue_timeout = kDefaultQueueTimeout;
		queue_buffer = kDefaultQueueBuffer; //obsolete
		auto_flush = true;
		backend_format = true;
		force_notify_priority = kNone; //obsolete
		start_on_create = false;
	}

	LogPriority priority;
	int queue_timeout;
	int queue_buffer;
	bool auto_flush;
	bool backend_format;
	bool start_on_create;
	LogPriority force_notify_priority;

	LoggerPtr logger_ptr;
	FormatterPtr formatter_ptr;
};


}//namespace logger

#endif //#ifndef _LOG_LOG_OPTION_H_
